package idv.mylee.web.slim3;

import org.slim3.controller.Controller;
import org.slim3.controller.FrontController;
import org.slim3.util.AppEngineUtil;

public class TidyFrontController extends FrontController {

	@Override
	protected Controller createController(String path) throws IllegalStateException {
		try {
			if (path.startsWith("/slim3/")) {
				if (AppEngineUtil.isDevelopment())
					System.out.println("controllerName: " + path);
				Controller c = (Controller)TidyHotReloadFactory.getBean(path);
				if (c!=null)
					return c;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return super.createController(path);
	}

}
